
// sign签名：sha1数据加密算法
const {hex_sha1} = require('./crypto.js')

// 请求的公用参数
let xpYun = {
	user:'打印机开发者id',
	timestamp:new Date().getTime(),
	UserKEY:'打印机秘钥',
	sn:'打印机sn',
	name:'餐厅名称'
}


// sign签名;数据加密算法
let siGn = function(){
	let {user,UserKEY,timestamp} = xpYun
	let sign = hex_sha1(user + UserKEY + timestamp)
	return sign
}

export {xpYun,siGn}
